package com.ruijie.orm.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.ruijie.orm.entity.User;

@Repository
public interface UserMapper {

	@Select("SELECT ID,USERNAME,PASSWORD FROM USER WHERE USERNAME=#{userName}")
	@Results(value = { @Result(property = "id", column = "ID"),
			@Result(property = "name", column = "USERNAME"),
			@Result(property = "password", column = "PASSWORD"), })
	User getUser(@Param("userName") String userName);
}
